<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>微信支付</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.8/vue.min.js"></script>
</head>
<body>
    <div>
        <form action="http://localhost:18001/pay" method="post">
            <label for="orderNo">
               商品订单号: <input name="orderNo" value="DF11223">
            </label>
            <label for="body">
                商品描述:<input name="body" value="iponethe">
            </label>
            <label for="price">
                商品价格:<input name="price" value="111">
            </label>

            <button type="submit">点击提交</button>
        </form>
        

    </div>
    <div id="app">
        这个是跨域测试
        <button class="hahaha" @click="handleclick">点击跨域提交</button>
    </div>
</body>
<script>
    let login = document.querySelector(".hahaha");
    //axios.post("http://localhost:18001/pay",{
        // axios.post("http://115.29.148.10:8989/login/loginUser?telephone=13923815937&password=123456",{
        //     // orderNo:this.state.price.orderNo,
        //     // body:this.state.price.body,
        //     // price:this.state.price.prices
        // }).then((res)=>{
        //     // console.log(this.state.price.orderNo)
        //     // console.log(this.state.price.body)
        //     // console.log(this.state.price.prices)
        //     console.log(res)
        // }).catch((err)=>console.log(err))
        let vm = new Vue({
            el:"app",
            data:{

            },
            method:{
                handleclick(){
                    console.log("进来了")
                   axios.post("http://115.29.148.10:8989/login/loginUser?telephone=13923815937&password=123456",{
                      // orderNo:this.state.price.orderNo,
                      // body:this.state.price.body,
                      // price:this.state.price.prices
                  }).then((res)=>{
                      // console.log(this.state.price.orderNo)
                      // console.log(this.state.price.body)
                      // console.log(this.state.price.prices)
                      console.log(res)
                  }).catch((err)=>console.log(err))
                }
            }
        })
</script>
</html>